import { PageParamsModel } from "@/model/page-params-model";

const options: object = {
  align: "center",
  menuAlign: "center",
  searchMenuPosition: "right",
  searchMenuSpan: 24,
  viewBtn: false,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  refreshBtn: true,
  columnBtn: true,
  searchShowBtn: true,
  filterBtn: false,
  gridBtn: true,
  menu: false,
  column: [
    {
      label: "ID",
      width: 50,
      prop: "id",
      search: true,
    },
    {
      label: "设备SN",
      width: 120,
      prop: "device_sn",
      search: true,
    },

    {
      label: "设备名称",
      align: "left",
      prop: "device_name",
      overHidden: true,
      search: true,
      with: 300,
    },

    {
      label: "设备图",
      prop: "device_image",
      type: "img",
      alone: true,
      width: 100,
    },

    {
      label: "设备类型",
      width: 100,
      prop: "device_category",
    },

    {
      label: "设备状态",
      width: 100,
      prop: "online_status",
      search: true,
      type: "select",
      dicData: [
        {
          label: "在线",
          value: 1,
        },
        {
          label: "离线",
          value: 0,
        },
      ],
    },

    {
      label: "设备型号",
      width: 100,
      prop: "device_model",
    },

    {
      label: "固件版本",
      width: 100,
      prop: "device_version",
    },

    {
      label: "用户姓名",
      width: 100,
      prop: "user_info.name",
      search: true,
    },

    {
      label: "身份证号",
      width: 200,
      prop: "user_info.id_card",
      overHidden: true,
    },

    {
      label: "联系方式",
      width: 150,
      prop: "user_info.mobile",
      search: true,
    },

    {
      label: "激活时间",
      width: 170,
      prop: "activate_time",
    },
    {
      label: "上线时间",
      width: 170,
      prop: "online_time",
    },
    {
      label: "离线时间",
      width: 170,
      prop: "offline_time",
    },
  ],
};

export default options;

export class DeviceSituationSearch extends PageParamsModel {
  id?: string = "";
  deviceID?: string = "";
  name?: string = "";
  type?: string = "";
  model?: string = "";
  userMobile?: string = "";
}
